package cn.xabad.server.thea.http

import cn.xabad.server.thea.model.*
import feign.Param
import feign.RequestLine

interface AppLogService {

    @RequestLine("GET /scoreboard/inner/list/after/clazz/new?userId=&teacherId=&businessCode=&businessCodes=&questionState=&lineState=&salary=true&groupId={groupId}&beginDate={startTime}&endDate={endTime}&page=0&size=100&access_token=8d5cc1972e0b5fe2a7c0c4047d392801fca7e98d3c1f0915ffbbab849046255f")
    fun queryMicroCourseInfoByGroupId(
            @Param("groupId") groupId: String,
            @Param("startTime") startTime: String,
            @Param("endTime") endTime: String
    ): HttpMicroCourseResult<MicroCourseInfo>


    @RequestLine("GET /app/log/v2/query?userId={userId}&event=&day={day}&sort=time,asc&startTime={startTime}&endTime={endTime}&page={page}&size={size}&BoxFishAccessToken={dataAccessToken}")
    fun queryLog(@Param("userId") userId: String,
                 @Param("day") day: String,
                 @Param("startTime") startTime: Long,
                 @Param("endTime") endTime: Long,
                 @Param("page") page: Int,
                 @Param("size") size: Int,
                 @Param("dataAccessToken") dataAccessToken: String): HttpLogResult<LogBean>

    //https://bugly.qq.com/v2/search?start=0&searchType=contectInfo&userSearchPage=%2Fv2%2Fworkbench%2Fapps&exceptionTypeList=Native&search=10996111&pid=1&platformId=1&date=last_7_day&sortOrder=desc&useSearchTimes=21&rows=20&sortField=imeiCount&appId=900003749&fsn=73e1f51e-7901-497c-8128-b4e543110639
    @RequestLine("GET /v2/search?startDateStr={startDate}&start=0&searchType=contectInfo&exceptionTypeList=Native&userSearchPage=%2Fv2%2Fworkbench%2Fapps&search={userId}&endDateStr={endDate}&pid=1&platformId=1&date=custom&sortOrder=desc&useSearchTimes=24&rows=20&sortField=imeiCount&appId=900003749")
    fun queryCrash(@Param("startDate") startDate: String,
                   @Param("endDate") endDate: String,
                   @Param("userId") userId: String):String

    @RequestLine("POST /online/monitor/reloadDeviceCard")
    fun reloadDevice()

    @RequestLine("GET /?s=User.getAccessToken")
    fun requestToken(): AccessTokenBean
}